<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>TransistorAuthorizationToken | React Native Background Geolocation</title>
	<meta name="description" content="Documentation for React Native Background Geolocation">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
	<link rel="shortcut icon" class="favicon" href="../assets/images/favicon.ico">
	<script src="../assets/js/search.js"></script>
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell left">
					<div class="brand">
						<a class="logo" href="https://www.transistorsoft.com"><img src="../assets/images/transistor-logo-bw.svg" /></a>
						<span class="title">
							<a href="/react-native-background-geolocation">[API Docs] React Native Background Geolocation</a>&nbsp;<span class="tsd-flag ts-flagOptional ts-flagVersion">v 4.18.0</span>
						</span>
					</div>
				</div>
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading"></li>
						<li class="state failure">The search index is not available</li>
					</ul>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../index.html">React Native Background Geolocation</a>
				</li>
				<li>
					<a href="transistorauthorizationtoken.html">TransistorAuthorizationToken</a>
				</li>
			</ul>
			<h1>Interface TransistorAuthorizationToken</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-9 col-content">
			<section class="tsd-panel tsd-comment">
				<div class="tsd-comment tsd-typography">
					<div class="lead">
						<p>Response object returned by <a href="../classes/backgroundgeolocation.html#findorcreatetransistorauthorizationtoken">BackgroundGeolocation.findOrCreateTransistorAuthorizationToken</a> for configuring the SDK&#39;s <a href="authorization.html">Authorization</a> with Transistor Software&#39;s Demo Server at <a href="http://tracker.transistorsoft.com">http://tracker.transistorsoft.com</a>.</p>
					</div>
					<p>You may also run your own instance of Demo Server locally.  See <a href="https://github.com/transistorsoft/background-geolocation-console">background-geolocation-console</a></p>
					<p>The test server is a great way to debug location problems or evalute the SDK&#39;s behaviour, since the results can easily be shared with <em>Transistor Software</em> when requesting support.</p>
					<p><img src="https://dl.dropboxusercontent.com/s/3abuyyhioyypk8c/screenshot-tracker-transistorsoft.png?dl=1" alt=""></p>
					<dl class="tsd-comment-tags">
						<dt class="tsd-comment-tag-example">example</dt>
						<dd><pre><code class="language-typescript"><span style="color: #88846F">// Url to demo server.</span>
<span style="color: #66D9EF">let</span><span style="color: #F8F8F2"> url </span><span style="color: #F92672">=</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">&quot;http://tracker.transistorsoft.com&quot;</span><span style="color: #F8F8F2">;</span>
<span style="color: #66D9EF">let</span><span style="color: #F8F8F2"> orgname </span><span style="color: #F92672">=</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">&quot;my-company-name&quot;</span><span style="color: #F8F8F2">;</span>
<span style="color: #66D9EF">let</span><span style="color: #F8F8F2"> username </span><span style="color: #F92672">=</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">&quot;my-username&quot;</span><span style="color: #F8F8F2">;</span>

<span style="color: #88846F">// Fetch an authoriztion token from server.  The SDK will cache the received token.</span>
<span style="color: #66D9EF">let</span><span style="color: #F8F8F2"> token </span><span style="color: #F92672">=</span><span style="color: #F8F8F2"> </span><span style="color: #F92672">await</span>
<span style="color: #F8F8F2">  BackgroundGeolocation.</span><span style="color: #A6E22E">findOrCreateTransistorAuthorizationToken</span><span style="color: #F8F8F2">(orgname, username, url);</span>

<span style="color: #F8F8F2">BackgroundGeolocation.</span><span style="color: #A6E22E">ready</span><span style="color: #F8F8F2">({</span>
<span style="color: #F8F8F2">  transistorAuthorizationToken: token</span>
<span style="color: #F8F8F2">})</span>
</code></pre>
							<a href="#viewing-your-tracking-results" id="viewing-your-tracking-results" style="color: inherit; text-decoration: none;">
								<h2>Viewing Your Tracking Results</h2>
							</a>
							<p>To <em>view</em> your tracking results in the browser, use your configured &quot;Organization Name&quot; and visit:</p>
							<p><a href="http://tracker.transistorsoft.com/my-organization-name">http://tracker.transistorsoft.com/my-organization-name</a></p>
						</dd>
					</dl>
				</div>
			</section>
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<span class="target">TransistorAuthorizationToken</span>
					</li>
				</ul>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="transistorauthorizationtoken.html#accesstoken" class="tsd-kind-icon">access<wbr>Token</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="transistorauthorizationtoken.html#expires" class="tsd-kind-icon">expires</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="transistorauthorizationtoken.html#refreshtoken" class="tsd-kind-icon">refresh<wbr>Token</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="transistorauthorizationtoken.html#url" class="tsd-kind-icon">url</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="accesstoken" class="tsd-anchor"></a>
					<h3>access<wbr>Token</h3>
					<div class="tsd-signature tsd-kind-icon">access<wbr>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>The authorization token to provide to <a href="authorization.html#accesstoken">Authorization.accessToken</a></p>
						</div>
						<dl class="tsd-comment-tags">
							<dt class="tsd-comment-tag-example">example</dt>
							<dd><pre><code class="language-typescript"><span style="color: #F8F8F2">BackgroundGeolocation.</span><span style="color: #A6E22E">ready</span><span style="color: #F8F8F2">({</span>
<span style="color: #F8F8F2"> authorization: {</span>
<span style="color: #F8F8F2">   accessToken:</span>
<span style="color: #F8F8F2"> }</span>
<span style="color: #F8F8F2">});</span>
</code></pre>
							</dd>
						</dl>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="expires" class="tsd-anchor"></a>
					<h3>expires</h3>
					<div class="tsd-signature tsd-kind-icon">expires<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>The expiry time of the <a href="authorization.html#accesstoken">Authorization.accessToken</a></p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="refreshtoken" class="tsd-anchor"></a>
					<h3>refresh<wbr>Token</h3>
					<div class="tsd-signature tsd-kind-icon">refresh<wbr>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>The token used to request to provide to <a href="authorization.html#refreshtoken">Authorization.refreshToken</a></p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="url" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> url</h3>
					<div class="tsd-signature tsd-kind-icon">url<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>The url to the Transistor Demo server where this token came from.
							<strong>Read only</strong></p>
						</div>
					</div>
				</section>
			</section>
		</div>
		<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-interface">
						<a href="transistorauthorizationtoken.html" class="tsd-kind-icon">Transistor<wbr>Authorization<wbr>Token</a>
						<ul>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="transistorauthorizationtoken.html#accesstoken" class="tsd-kind-icon">access<wbr>Token</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="transistorauthorizationtoken.html#expires" class="tsd-kind-icon">expires</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="transistorauthorizationtoken.html#refreshtoken" class="tsd-kind-icon">refresh<wbr>Token</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="transistorauthorizationtoken.html#url" class="tsd-kind-icon">url</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-interface">
						<a href="transistorauthorizationtoken.html" class="tsd-kind-icon">Transistor<wbr>Authorization<wbr>Token</a>
						<ul>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="transistorauthorizationtoken.html#accesstoken" class="tsd-kind-icon">access<wbr>Token</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="transistorauthorizationtoken.html#expires" class="tsd-kind-icon">expires</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="transistorauthorizationtoken.html#refreshtoken" class="tsd-kind-icon">refresh<wbr>Token</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="transistorauthorizationtoken.html#url" class="tsd-kind-icon">url</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer class="with-border-bottom">
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="container tsd-generator">
	<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4NNZKTE395"></script>
<script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-4NNZKTE395');
    </script>
</body>
</html>